import { useTable, LIST_TYPE } from '@crud/index';
import { getUserList as getList } from '@/api/crm-kgj/commune';

export const statusOptions = [
  {
    label: '不限',
    value: 0
  },
  {
    label: '未过期',
    value: 1
  },
  {
    label: '已过期',
    value: 2
  }
];

export const useTableList = (options: any = {}) => {
  const columns = [
    {
      label: '用户ID',
      prop: 'user_id',
      align: 'center'
    },
    {
      label: '用户名称',
      prop: 'nick_name',
      render: 'nick_name',
      width: 200,
      align: 'center'
    },
    {
      label: '手机号',
      prop: 'mobile',
      align: 'center'
    },
    {
      label: '所在社群',
      prop: 'association',
      align: 'center',
      width: 150
    },
    {
      label: '考古加到期时间',
      prop: 'end_time',
      type: 'dateTime',
      align: 'center',
      width: 177
    },
    {
      label: '社区到期时间',
      prop: 'club_end_time',
      type: 'dateTime',
      align: 'center',
      width: 177
    }
    /* {
      label: '操作',
      align: 'center',
      render: 'actions',
      width: 160,
      fixed: 'right'
    } */
  ];

  return useTable({
    ...options,
    type: LIST_TYPE.KGJ,
    params: {},
    columns,
    getList
  });
};
